//
//  UIView+ACSLayer.h
//  ZYOils
//
//  Created by 段新瑞 on 2019/9/25.
//  Copyright © 2019 Mr.Xr. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIView (ACSLayer)

/// View 指定圆角
/// @param radius 设置圆角大小
/// @param corner 设置圆角位置
- (void)acs_radiusWithRadius:(CGFloat)radius corner:(UIRectCorner)corner;


/// 设置阴影
/// @param radius 圆角
/// @param Color 颜色
/// @param offset 偏移量
/// @param opacity 透明度
- (CALayer *)acs_shadowWithRadius:(CGFloat)radius color:(UIColor *)Color offset:(CGSize)offset opacity:(CGFloat)opacity;

@end

@interface UIView (Designable)

@property (nonatomic, assign) IBInspectable CGFloat cornerRadius;
@property (nonatomic, assign) IBInspectable CGFloat borderWidth;
@property (nonatomic, assign) IBInspectable UIColor *borderColor;

@end


@interface UIView (FrameExtention)
/**
 *  修改x坐标
 */
@property (assign, nonatomic)CGFloat x;

/**
 *  修改y坐标
 */
@property (assign, nonatomic)CGFloat y;

/**
 *  修改宽度
 */
@property (assign, nonatomic)CGFloat width;

/**
 *  修改高度
 */
@property (assign, nonatomic)CGFloat height;

/**
 *  修改坐标
 */
@property (assign, nonatomic)CGPoint origin;

/**
 *  修改大小
 */
@property (assign, nonatomic)CGSize size;

/**
 *  中间的X
 */
@property (assign, nonatomic, readonly)CGFloat midX;

/**
 *  中间的Y
 */
@property (assign, nonatomic, readonly)CGFloat midY;

/**
 *  最大的X
 */
@property (assign, nonatomic, readonly)CGFloat maxX;

/**
 *  最大的Y
 */
@property (assign, nonatomic, readonly)CGFloat maxY;

/**
 *  中点的X
 */
@property (nonatomic, assign) CGFloat centerX;
/**
 *  中点的Y
 */
@property (nonatomic, assign) CGFloat centerY;

@end

NS_ASSUME_NONNULL_END
